<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="head.htm"/>
<script>
	$(function() {
		var dates = $( "#from, #to" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			numberOfMonths: 3,
			onSelect: function( selectedDate ) {
				var option = this.id == "from" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
		$( "#from" ).datepicker( "option", "dateFormat", "dd.mm.yy" );
		$( "#to" ).datepicker( "option", "dateFormat", "dd.mm.yy" );
	});
</script>
</head>
<body>
	<jsp:include page="loggedIn.jsp" />
	<div id="head"><h1>Zeiterfassung</h1></div>
	<jsp:include page="menu.jsp"/>
	<div id="content">
		<h2><c:out value="${title}"/></h2>
		<form method="post" action="SaveUrlaub.html" class="button" id="validForm">
			<table cellspacing="0" cellpadding="0" class="atag">
				<colgroup>
					<col class="attribute"/>
					<col class="value"/>
				</colgroup>
					<tr>
					<th>Mitarbeiter</th>
						<th>
						<c:choose>
						<c:when test="${check=='true'}">
							<input type="hidden" name="id" value='<c:out value="${urlaub.id}"/>'/>
							<input type="hidden" name="m_id" value='<c:out value="${mitarbeiter.id}"/>'/>
								<c:out value="${mitarbeiter.mit_name}," />
								<c:out value="${mitarbeiter.mit_vorname}" />
						</c:when>
						<c:otherwise>
							<input type="hidden" name="id"
									value='<c:out value="${urlaub.id}"/>' />
								<input type="hidden" name="m_id"
									value='<c:out value="${urlaub.mitarbeiter.id}"/>' />
									<input type="hidden" name="admin" value='<c:out value="true"/>' />
								<c:out value="${urlaub.mitarbeiter.mit_name}," />
								<c:out value="${urlaub.mitarbeiter.mit_vorname}" />
						
						</c:otherwise>
					</c:choose>
					
					</th>
					</tr>
					<tr>
						<td>Von</td>
						<td>
							
							<input type="text" class="textbox required" id="from" name="urlaub_von" value='<c:out value="${urlaub.urlaub_von}"/>' size="50" />
						</td>
					</tr>
 					<tr>
						<td>Bis</td>
						<td>
							<input type="text" class="textbox required" id="to" name="urlaub_bis" value='<c:out value="${urlaub.urlaub_bis}"/>' size="50" />
						</td>
					</tr>
					<tr class="submit">
						<td colspan="2">
								<input type="submit" value=" Daten absenden "/>
						</td>
					</tr>
			</table>
		</form>
	</div>
</body>
</html>